package org.dromara.system.dict.spi;

import org.dromara.system.dict.constant.DicConstants;
import org.dromara.system.dict.mapper.IndicatorFactorMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.Map;

/**
 * 扩展数据字典服务类
 */
@Component
public class SpiIndicatorFactorServiceImpl implements SpiService {

    @Autowired
    private IndicatorFactorMapper indicatorFactorMapper;

    @Override
    public Map<String, Map<String, String>> dictionaries() {
        return Collections.singletonMap(DicConstants.TYPE_INDICATOR_FACTOR, toMap(indicatorFactorMapper.selectList(null)));
    }
}
